package admrouter

import (
	"github.com/gin-gonic/gin"
	"yundian/internel/app/handlers/pcl/admin/rosterhandler"
	"yundian/internel/app/handlers/pcl/admin/sitesettinghandler"
	"yundian/internel/app/middlewares"
	"yundian/internel/pkg/dingo"
)

func InitSiteSettingRouter() dingo.ApiRouter {

	return func(g *gin.RouterGroup) {
		{
			s := g.Group("siteSetting")
			s.Use(middlewares.JwtAuthMiddleware)

			s.GET("/billingRulesList", sitesettinghandler.BillingRulesList)        // 计费规则列表
			s.PUT("/billingRulesEdit", sitesettinghandler.BillingRulesEdit)        // 修改计费规则
			s.POST("/billingRulesSave", sitesettinghandler.BillingRulesSave)       // 新增计费规则
			s.DELETE("/billingRulesDelete", sitesettinghandler.BillingRulesDelete) // 删除计费规则
			s.POST("/billingRulesUse", sitesettinghandler.BillingRulesUse)         // 应用计费规则

			s.GET("/rewardPloyList", sitesettinghandler.RewardPloyList)        // 奖励规则列表
			s.PUT("/rewardPloyEdit", sitesettinghandler.RewardPloyEdit)        // 修改奖励规则
			s.POST("/rewardPloySave", sitesettinghandler.RewardPloySave)       // 新增奖励规则
			s.DELETE("/rewardPloyDelete", sitesettinghandler.RewardPloyDelete) // 删除奖励规则
			s.POST("/rewardPloyUse", sitesettinghandler.RewardPloyUse)         // 应用奖励规则

			s.GET("/couponList", sitesettinghandler.CouponList)        // 优惠券列表
			s.PUT("/couponEdit", sitesettinghandler.CouponEdit)        // 优惠券修改
			s.POST("/couponSave", sitesettinghandler.CouponSave)       // 优惠券新增
			s.DELETE("/couponDelete", sitesettinghandler.CouponDelete) // 优惠券删除

			s.GET("/paySettingList", sitesettinghandler.PaySettingList)          // 支付配置列表
			s.PUT("/paySettingEdit", sitesettinghandler.PaySettingEdit)          // 支付配置修改
			s.POST("/paySettingSave", sitesettinghandler.PaySettingSave)         // 支付配置新增
			s.DELETE("/paySettingDelete", sitesettinghandler.PaySettingDelete)   // 支付配置删除
			s.POST("/payCertsPathUpload", sitesettinghandler.PayCertsPathUpload) // 支付证书文件上传

			s.GET("/withdrawalSettingList", sitesettinghandler.WithdrawalSettingList)        // 提现配置列表
			s.PUT("/withdrawalSettingEdit", sitesettinghandler.WithdrawalSettingEdit)        // 提现配置修改
			s.POST("/withdrawalSettingSave", sitesettinghandler.WithdrawalSettingSave)       // 提现配置新增
			s.DELETE("/withdrawalSettingDelete", sitesettinghandler.WithdrawalSettingDelete) // 提现配置删除

			s.GET("/ratingSettingList", sitesettinghandler.RatingSettingList)        // 评级配置列表
			s.PUT("/ratingSettingEdit", sitesettinghandler.RatingSettingEdit)        // 评级配置修改
			s.POST("/ratingSettingSave", sitesettinghandler.RatingSettingSave)       // 评级配置新增
			s.DELETE("/ratingSettingDelete", sitesettinghandler.RatingSettingDelete) // 评级配置删除

			s.GET("rosterList", rosterhandler.HandlerGetRoster)      //黑白名单列表
			s.PUT("rosterUpdate", rosterhandler.HandlerUpdateRoster) //黑白名单修改

			s.GET("bannerList", sitesettinghandler.GetBannerList)     //广告配置列表查询
			s.PUT("bannerUpdate", sitesettinghandler.BannerUpdate)    //广告配置修改
			s.POST("bannerInsert", sitesettinghandler.BannerInsert)   //广告配置新增
			s.DELETE("bannerDelete", sitesettinghandler.BannerDelete) //广告配置删除
			//s.POST("bannerImgUpload", sitesettinghandler.BannerImgUpload) //广告配置上传图片

			//智能对话
			//配置机器人接口
			s.POST("/batchImportSkill", sitesettinghandler.HandlerBatchImportSkill)
			s.POST("/robotRelease", sitesettinghandler.HandlerRobotRelease)
			s.POST("/robotPublishProgress", sitesettinghandler.HandlerRobotPublishProgress)
			s.POST("/setAutoReply", sitesettinghandler.HandlerSetAutoReply)

			//智能对话接口
			s.POST("smartDialogue", sitesettinghandler.HandlerSmartDialogue)

		}
	}
}
